-
Notifications
You must be signed in to change notification settings - Fork 220
Provide a MinPortsPerVM for Nat Router #1531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @barbacbd. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-gcp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/ok-to-test |
|
We are choosing to only allow the MinPortsPerVM because the DynamicPortAllocation is not allowed in the current CAPG configuration. This means that dynamic port allocation is set to false. MinPortsPerVM expects the dynamic port allocation to be false while MaxPortsPerVM expects the value to be set to true. In the future, if MaxPortsPerVM is to be added, we need to also add EnableDynamicPortAllocation. |
** This is a regression for the openshift installer. Instead of filling this value in, the default will be 64 (so that this is backwards compatible), otherwise the user can provide this information in the cluster spec. ** MinPortsPerVM: Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
0176c2b to
8fba12f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/assign @salasberryfin @justinsb @cpanato
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: barbacbd, damdo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| Mtu int64 `json:"mtu,omitempty"` | ||
|
|
||
| // MinPortsPerVM: Minimum number of ports allocated to a VM from this NAT | ||
| // config. If not set, a default number of ports is allocated to a VM. This is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we might want to specify that this is configured on the Nat Router, I wasn't entirely sure what this doing otherwise. But it's only a comment, so not a blocker IMO.
| Name: fmt.Sprintf("%s-%s", networkSpec.Name, "nat"), | ||
| NatIpAllocateOption: "AUTO_ONLY", | ||
| SourceSubnetworkIpRangesToNat: "ALL_SUBNETWORKS_ALL_IP_RANGES", | ||
| MinPortsPerVm: s.GCPCluster.Spec.Network.MinPortsPerVM, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So how does defaulting work here with existing objects? I guess worst-case (default not applied) the code does the same thing it did before (and 64 is also the default on the NatRouter, I believe, so we shouldn't be changing the actual value in GCP either)
|
Some questions about defaulting, but I think because of your clever choices of defaults they don't actually matter here. /lgtm |
|
/test pull-cluster-api-provider-gcp-apidiff I worry that I've broken our apidiff test - or at least broken it printing nice error messages... |
What type of PR is this?
/kind feature
What this PR does / why we need it
** This is a regression for the openshift installer.
Instead of filling this value in, the default will be 64 (so that this is backwards compatible), otherwise the user can provide this information in the cluster spec.
** MinPortsPerVM: Minimum number of ports allocated to a VM from this NAT config. If not set, a default number of ports is allocated to a VM. This is rounded up to the nearest power of 2. For example, if the value of this field is 50, at least 64 ports are allocated to a VM.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
https://issues.redhat.com/browse/OCPBUGS-61876
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: